From: Aaron Plattner Date: Fri, 18 Mar 2016 23:00:05 +0000 (-0700) Subject: st: Fix offscreen leak if cogl_framebuffer_allocate fails X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~898 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=941513b280433c269491572b7b1de2a7c5bab21b;p=gnome-shell.git st: Fix offscreen leak if cogl_framebuffer_allocate fails If cogl_framebuffer_allocate fails in _st_create_shadow_pipeline_from_actor, the CoglOffscreen* that was allocated earlier in the function is leaked. https://bugzilla.gnome.org/show_bug.cgi?id=735705 Signed-off-by: Aaron Plattner --- diff --git a/src/st/st-private.c b/src/st/st-private.c index 559336c42..d40eceb86 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -442,6 +442,7 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec, if (!cogl_framebuffer_allocate (fb, &catch_error)) { cogl_error_free (catch_error); + cogl_object_unref (offscreen); cogl_object_unref (buffer); return NULL; }